package cn.javabb.project.controller;

import cn.javabb.framework.web.controller.BaseController;
import cn.javabb.framework.web.page.TableDataInfo;
import cn.javabb.project.entity.SysTemplate;
import cn.javabb.project.model.dto.ProjectDTO;
import cn.javabb.project.model.qry.ProjectQry;
import cn.javabb.project.service.GenProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @desc:
 * @author: javabb (javabob(a)163.com)
 * @create: 2022/01/17 23:46
 */
@Api(tags = "项目管理")
@RequestMapping("/project")
@RestController
public class ProjectController extends BaseController {

    @Autowired
    private GenProjectService genProjectService;

    @ApiOperation("分页查询项目")
    @GetMapping("/")
    public TableDataInfo list(ProjectQry qry) {
        startPage();
        List<ProjectDTO> list = genProjectService.list(qry);
        return getDataTable(list);
    }

}
